package com.github.m6d21.sso.service.role;

import com.github.m6d21.sso.model.role.entity.Role;
import com.github.m6d21.sso.model.role.qo.RoleQO;
import com.github.pagehelper.PageInfo;
import java.util.List;
import javax.validation.constraints.NotNull;

/**
 *<p>
 *
 *</p>
 *
 * @author liuyang
 * @date 2019/1/4 Fri 17:19:00
 * @since 1.0.0
 */
public interface IRoleService {

    Role saveRole(Role role);

    PageInfo<Role> queryByPage(Integer pageNo, Integer pageSize, RoleQO RoleQO);

    PageInfo<Role> queryByPageForAdmin(Integer pageNo, Integer pageSize, RoleQO RoleQO);

    Role modifyRoleById(Role Role);

    Boolean deleteRoleById(@NotNull(message = "权限id不能为空") Integer id);

    Boolean deleteRoleByIds(@NotNull(message = "权限ids不能为空") List<Integer> ids);

    Boolean existByRoleCode(@NotNull(message = "权限Code不能为空") String RoleCode);
}
